-- GENERATED SPELL FOR [Massive Jormungar] --


function spell0_26685(pUnit, Event) --@Acid Spit,n/a--
pUnit:FullCastSpellOnTarget(48132,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26685', 21000, 1)
end

function spell1_26685(pUnit, Event) --@Acid Splatter,Self--
pUnit:FullCastSpellOnTarget(48136,pUnit)
pUnit:RegisterEvent('Sorts_26685', 2321, 1)
end

function spell2_26685(pUnit, Event) --@Acid Splatter,Self--
pUnit:FullCastSpellOnTarget(59272,pUnit)
pUnit:RegisterEvent('Sorts_26685', 2271, 1)
end

function spell3_26685(pUnit, Event) --@Poison Breath,n/a--
pUnit:FullCastSpellOnTarget(48133,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26685', 1000, 1)
end

function spell4_26685(pUnit, Event) --@Poison Breath,n/a--
pUnit:FullCastSpellOnTarget(59271,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26685', 1000, 1)
end

function Sorts_26685(pUnit, Event)
local choix_sorts_26685 = math.random(0, 4)
if choix_sorts_26685 == 0 then
pUnit:RegisterEvent('spell0_26685', 1, 1)
end
if choix_sorts_26685 == 1 then
pUnit:RegisterEvent('spell1_26685', 1, 1)
end
if choix_sorts_26685 == 2 then
pUnit:RegisterEvent('spell2_26685', 1, 1)
end
if choix_sorts_26685 == 3 then
pUnit:RegisterEvent('spell3_26685', 1, 1)
end
if choix_sorts_26685 == 4 then
pUnit:RegisterEvent('spell4_26685', 1, 1)
end
end

function mob26685_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26685', math.random(1500, 3000), 1)
end

function mob26685_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26685_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26685_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26685, 1, 'mob26685_Action')
RegisterUnitEvent(26685, 2, 'mob26685_Leave')
RegisterUnitEvent(26685, 3, 'mob26685_Kill')
RegisterUnitEvent(26685, 4, 'mob26685_Die')
